from tortoise import Model, fields


class BaseModel(Model):
    create_time = fields.DatetimeField(auto_now_add=True, description='创建时间', null=True)
    update_time = fields.DatetimeField(auto_now_add=True, description='更新时间', null=True)
    create_by = fields.CharField(max_length=32, description='创建者', null=True)
    update_by = fields.CharField(max_length=32, description='创建者', null=True)
    is_delete = fields.BooleanField(default=False, description='是否删除')

    class Mate:
        abstract = True
